<h1>Cechy produktów</h1>
{mainoptions title="Lista"}
		<table cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td>{tables label="Lp. [id]" tid=property_table o=id}</td>
				<td>{tables label="Nazwa [Grupa]" tid=property_table o=name}</td>
				<td>{tables label="Pozycja w groupie" tid=property_table o=position}</td>
				<th colspan="2" class="noSort"><a href="{url Property=Add}" class="add">Dodaj</a><div class="sort"><a class="ascendingAct" href="#">&nbsp;</a><a class="descending" href="#">&nbsp;</a></div></th>

			</tr>
			{foreach from=$list item=obj name=property_table key=k}
			<tr>
				<td>{tables type='lp' tid='property_table' iteration=$smarty.foreach.property_table.iteration} [{$obj->getId()}]</td>
				<td>{$obj->getName()}{assign var=groupDesc value=$obj->getPropertyGroupDescription()} [{$groupDesc->getDescription()}]</td>
				<td>{$obj->getPosition()}{assign var=group value=$obj->getPropertyGroup()} [{$group->getPosition()}]</td>
				<td>
					{math equation="x-1" x=$k assign=prevk}{if isset($list.$prevk) AND $list.$prevk->getIdPropertyGroup() eq $obj->getIdPropertyGroup()}<a href="{url property=switch id=$obj->getId() id_2=$list.$prevk->getId()}" ><img src="{$urlStatic}/image/Admin/move_up.png" alt="w górę" title="w górę" /></a>{/if}
					{math equation="x+1" x=$k assign=nextk}{if isset($list.$nextk) AND $list.$nextk->getIdPropertyGroup() eq $obj->getIdPropertyGroup()}<a href="{url property=switch id=$obj->getId() id_2=$list.$nextk->getId()}"  ><img src="{$urlStatic}/image/Admin/move_down.png" alt="w dół" title="w dół" /></a>{/if}
				</td>
				<td>
					
					<a href="{url property=edit id=$obj->getId()}" class="edit"> edytuj</a>
					<a onclick="if(!confirm('Czy na pewno chcesz usunąć ten element?'))return false;" href="{url property=remove id=$obj->getId()}" class="delete"> usuń</a>
				</td>

			</tr>
			{/foreach}
			<tr class="selAllRow">
				<td colspan="2">
					<div class="pager">
						{tables type='pagination' tid='property_table' all_count=$c}
						{tables type='on_page' tid='property_table'}
					</div>
				</td>
			</tr>
		</table>
{/mainoptions}
<h1>Grupy cech</h1>
{mainoptions title="Lista"}
		<table cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td>{tables label="Lp. [id]" tid=property_group_table o=id}</td>
				<td>{tables label="Nazwa" tid=property_group_table o=name}</td>
				<td>{tables label="Pozycja" tid=property_group_table o=position}</td>
				<th class="noSort"><a href="{url Property=AddGroup}" class="add">Dodaj</a><div class="sort"><a class="ascendingAct" href="#">&nbsp;</a><a class="descending" href="#">&nbsp;</a></div></th>

			</tr>
			{foreach from=$list2 item=obj name=property_group_table}
			<tr>
				<td>{tables type='lp' tid='property_group_table' iteration=$smarty.foreach.property_group_table.iteration} [{$obj->getId()}]</td>
				<td>{$obj->getName()}</td>
				<td>{$obj->getPosition()}</td>
				<td>
					
					<a href="{url property=editGroup id=$obj->getId()}" class="edit"> edytuj</a>
					<a onclick="if(!confirm('Czy na pewno chcesz usunąć ten element?'))return false;" href="{url Property=removeGroup id=$obj->getId()}" class="delete"> usuń</a>
				</td>
			</tr>
			{/foreach}
			<tr class="selAllRow">
				<td colspan="2">
					<div class="pager">
						{tables type='pagination' tid='property_group_table' all_count=$c2}
						{tables type='on_page' tid='property_group_table'}
					</div>
				</td>
			</tr>
		</table>
{/mainoptions}